package cn.tedu.pet.product.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@Accessors(chain = true)
public class CategoryAddNewParam implements Serializable {
    @NotNull(message = "必须提交类别名称！")
    @ApiModelProperty(value = "类别名称",required = true)
    private String name;

    @NotNull(message = "必须提交父级类别id，没有填0！")
    @Range(max = 99,message = "排序序号值必须0-99之间")
    @ApiModelProperty(value = "排序序号，必须是0-255之间的数字",required = true,example = "88")
    private Long parentId;

    private String keywords;

    @NotNull(message = "必须提交排序序号！")
    @Range(max = 99,message = "排序序号值必须0-99之间")
    @ApiModelProperty(value = "排序序号，必须是0-255之间的数字",required = true,example = "88")
    private Integer sort;

    private String icon;

    @NotNull(message = "必须提交启动状态！")
    @Range(max = 1,message = "启动状态值必须0-1之间")
    @ApiModelProperty(value = "启动状态，必须是0-1之间的数字",required = true,example = "1")
    private Integer enable;

    @NotNull(message = "必须提交是否在导航栏！")
    @Range(max = 1,message = "是否在导航栏值必须0-1之间")
    @ApiModelProperty(value = "是否在导航栏，必须是0-1之间的数字",required = true,example = "1")
    private Integer isDisplay;

}
